package com.huluobo.h3kotlindemo.db

import android.content.Context
import androidx.room.Room

/**
 *  Created by LC on 2023/11/3.
 */
class DatabaseUtil {
    companion object {
        private lateinit var database: AppDatabase

        fun init(context: Context) {
            database = Room.databaseBuilder(context, AppDatabase::class.java, "mail.db")
                .allowMainThreadQueries()
                .build()
        }

        fun getDatabase(): AppDatabase = database
    }
}